package org.example.server.goods.mapstruct.category;

import org.example.api.goods.category.response.CategorySummaryResponse;
import org.example.server.goods.entity.CategoryEntity;
import org.example.server.goods.repo.doo.CategorySummaryDo;
import org.example.server.goods.service.category.bo.CategorySummaryBo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(componentModel = "spring")
public interface CategoryConverter {
  /**
   * 转换实例
   */
  CategoryConverter INSTANCE = Mappers.getMapper(CategoryConverter.class);

  List<CategorySummaryDo> toCategorySummaryFromEntity(List<CategoryEntity> records);

  CategorySummaryDo toCategorySummaryFromEntity(CategoryEntity records);

  CategorySummaryBo toCategorySummaryFromDo(CategorySummaryDo record);

  List<CategorySummaryBo> toCategorySummaryFromDo(List<CategorySummaryDo> records);

  List<CategorySummaryResponse> toCategorySummaryFromBo(List<CategorySummaryBo> categorySummaryBos);

  CategorySummaryResponse toCategorySummaryFromBo(CategorySummaryBo categorySummaryBos);
}
